package com.fcscs.ecms.gwt.client;

import java.util.List;

import com.fcscs.cservice.domain.MainMenuItem;
import com.fcscs.cservice.domain.model.MainMenuItemView;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("../gwt/ecmsMainMenu")
public interface ECMSMainMenuService extends RemoteService{


	/**
	 * @param id
	 * @return
	 */
	MainMenuItem getMainMenuItem(long id);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param isCurrent
	 * @return
	 */
	List<MainMenuItem> getMainMenuItemList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	/**
	 * @param orgId
	 * @param propId
	 * @param versionId
	 * @return
	 */
	List<MainMenuItem> getMainMenuItemList(long orgId, long propId, long versionId); //get specified version data

	/**
	 * @param mmiList
	 * @return
	 */
	List<MainMenuItem> saveMainMenuItemList(List<MainMenuItem> mmiList); //used to save display order

	/**
	 * @param mmi
	 * @return
	 */
	MainMenuItem createMainMenuItem(MainMenuItem mmi);

	/**
	 * @param mmi
	 * @return
	 */
	MainMenuItem saveMainMenuItem(MainMenuItem mmi);
	
	/**
	 * @param mmi
	 * @return
	 */
	boolean deleteMainMenuItem(MainMenuItem mmi);

	/**
	 * @param mmi
	 * @return
	 */
	boolean permDeleteMainMenuItem(MainMenuItem mmi);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param menuType
	 * @param id
	 * @param versionId
	 * @return
	 */
	boolean isMainMenuItemTaken(long orgId, long propId, String menuType, Long id, long versionId);

	/**
	 * @param orgId
	 * @param propId
	 * @return
	 */
	List<MainMenuItemView> getMainMenuItemViewList(long orgId, long propId); //used by web service, get current version
}
